package cn.sinonet.sms.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.sinonet.sms.dao.DQTXDao;
import cn.sinonet.sms.model.DQTX;

@Service("dqtxManager")
public class DQTXManagerImp extends GenericManagerImp<DQTX, Long> implements
		DQTXManager {

	DQTXDao dqtxDao;

	public DQTXDao getDqtxDao() {
		return dqtxDao;
	}

	@Autowired
	public void setDqtxDao(DQTXDao dqtxDao) {
		this.dao = dqtxDao;
		this.dqtxDao = dqtxDao;
	}

	@Override
	public DQTX saveDQTX(DQTX dqtx) {
		return dao.save(dqtx);
	}

	public DQTX loadByMessageAndPhone(String message, String phone, String time) {
		return (DQTX) dqtxDao.loadByMessageAndPhone(message, phone, time);
	}

	public DQTX loadByMessageAndPhone(String message, String phone) {
		return (DQTX) dqtxDao.loadByMessageAndPhone(message, phone);
	}

}
